/*
- Malt Project - string.hpp
- This document is protected by the GPL protocol.
- Writer:@Index-Flandre
*/

#ifndef MALT_STRING_H
#define MALT_STRING_H

#include "./object.hpp"

namespace malt
{

Object *NewString();
Object *NewSymbol();
Object *NewString(char *obj, unsigned long size);
Object *NewSymbol(char *obj, unsigned long size);
char *CopyStr(const char *str, unsigned long size);

struct String : public BoxObject
{
	unsigned long hash_value;
	char *chars;

	String();
	String(char *obj, unsigned long size);
	bool eq(Object *obj);
	void repl_print();
	virtual unsigned long Hash();
};

struct Symbol : public String
{
	void repl_print();
};

extern String NullString;
}

#endif